package fr.afcepf.ai89.esharing.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the fr_commune database table.
 * 
 */
@Embeddable
public class FrCommunePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="ID_DEPARTEMENT")
	private String idDepartement;

	@Column(name="CODE_COMMUNE")
	private long codeCommune;

	public FrCommunePK() {
	}
	public String getIdDepartement() {
		return this.idDepartement;
	}
	public void setIdDepartement(String idDepartement) {
		this.idDepartement = idDepartement;
	}
	public long getCodeCommune() {
		return this.codeCommune;
	}
	public void setCodeCommune(long codeCommune) {
		this.codeCommune = codeCommune;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof FrCommunePK)) {
			return false;
		}
		FrCommunePK castOther = (FrCommunePK)other;
		return 
			this.idDepartement.equals(castOther.idDepartement)
			&& (this.codeCommune == castOther.codeCommune);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idDepartement.hashCode();
		hash = hash * prime + ((int) (this.codeCommune ^ (this.codeCommune >>> 32)));
		
		return hash;
	}
}